// Copyright (c) 2000, <PIGS - Image Processing>
package save;

import javax.media.jai.PlanarImage;


public class SaveStrategy {


	public Save save;
    DirectorSave directorSave = new DirectorSave();
	
	private boolean flag;
  
   public void SaveStrategy()
   {
   	//empty constructor
   }
   
   	public void choice(int choice, PlanarImage src, String filename) 
   	{	   
       switch (choice)
       {
           case 1   :
		             this.save = new SaveJPG();					 
				     flag=directorSave.Construct(this.save, src, filename );					 		            
					 break;  
		   case 2   :
		   			 this.save = new SaveBMP();					 
				     flag=directorSave.Construct(this.save, src, filename );		             	             
					 break;
		   case 3   :
		             this.save = new SavePNG();					 
				     flag=directorSave.Construct(this.save, src, filename );		             
					 break;	
		   case 4   :
		             this.save = new SaveTIFF();					 
				     flag=directorSave.Construct(this.save, src, filename );		             
					 break;
		   case 5   :
		             this.save = new SavePNM();					 
				     flag=directorSave.Construct(this.save, src, filename );		             
					 break;           
           default  : 
		             System.out.println("teste");
		              
       }  
	   //return this.imageReturn;  
   	} 


}
